﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MovieRental.XmlDataService;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;

namespace MovieRental.Entities
{
    [XmlEntity("Editions")]
    [DataContract]
    public class EditionInfo : BaseEntity<Guid>
    {
        private Guid _movieId;
        private Guid _discountId;
        private Guid _mediaTypeId;
        private string _publisher;
        private double _pricePerDay;
        private int _quantity;

        public EditionInfo()
        {
            Id = Guid.NewGuid();
        }

        public EditionInfo(Guid id)
        {
            Id = id;
        }

        [DataMember]
        public Guid MovieId
        {
            set { SetProperty<Guid>(ref _movieId, value, "MovieId"); }
            get { return _movieId; }
        }


        [DataMember]
        public Guid DiscountId
        {
            set { SetProperty<Guid>(ref _discountId, value, "DiscountId"); }
            get { return _discountId; }
        }

        [DataMember]
        public Guid MediaTypeId
        {
            set { SetProperty<Guid>(ref _mediaTypeId, value, "MediaTypeId"); }
            get { return _mediaTypeId; }
        }

        [DataMember]
        public string Publisher
        {
            set { SetProperty<string>(ref _publisher, value, "Publisher"); }
            get { return _publisher; }
        }

        [DataMember]
        public double PricePerDay
        {
            set { SetProperty<double>(ref _pricePerDay, value, "PricePerDay"); }
            get { return _pricePerDay; }
        }

        [DataMember]
        public int Quantity
        {
            set { SetProperty<int>(ref _quantity, value, "Quantity"); }
            get { return _quantity; }
        }
    }
}
